#ifndef _COMPONENT_H_
#define _COMPONENT_H_

#include "SFML/OpenGL.hpp"
#include <string>
#include "ComponentType.h"

struct Component
{
    int type;
    //int entityID;
};

struct PositionComponent : Component
{
    PositionComponent()
    {
        type = cPosition;
        x = 0;
        y = 0;
    }

    int x;
    int y;
};


struct VelocityComponent : Component
{
    VelocityComponent()
    {
        type = cVelocity;
        x = 0;
        y = 0;
    }
    float x;
    float y;

};

struct ImageComponent : Component
{
    ImageComponent()
    {
        type = cImage;
        filename = "";
    }
    Rect clip;
    std::string filename;
    sf::Texture texture;
};

struct PhysicsComponent : Component
{
    PhysicsComponent()
    {
        type = cPhysics;
    }
};

struct PhysicsComponent : Component
{
    PhysicsComponent()
    {
        type = cPhysics;
        gravity = 0;
    }
    float gravity;
};

struct ItemComponent : Component
{
    ItemComponent()
    {
        type = cItem;
        effect = 0;
        effectType = 0;
    }
    int effect;
    int effectType;
};

struct CollisionComponent : Component
{
    CollisionComponent()
    {
        type = cCollision;
        collisionType = 0;
    }
    int collisionType;
};

struct InputComponent : Component
{
    InputComponent()
    {
        type = cInput;
    }
    // add vars
};

struct NpcComponent : Component
{
    NpcComponent()
    {
        type = cNpc;
        enemy = false;
    }
    bool enemy;
};

struct MapComponent : Component
{
    MapComponent()
    {
        type = cMap;
    }
};

struct TextComponent : Component
{
    TextComponent()
    {
        type = cText;
    }
};

#endif
